<template>
	<view>
		Hello Cart
		{{query}}

		<button @click="send">{{num}}</button>
	</view>
</template>

<script setup>
	import {
		onLoad
	} from '@dcloudio/uni-app';

	import {
		ref
	} from 'vue';

	const query = ref({});
	const num = ref(100);

	function send() {
		uni.$emit('send-num', num.value++)
	}


	onLoad((options) => {
		console.log(options);
		query.value = options;

		uni.$on('send-age', e => console.log(e, 'hello age'))
	})
</script>

<style>

</style>